package group2assignone.ucm.manager;

import group2assignone.ucm.UCController;
import group2assignone.view.manager.DeleteFlightView;
import group2assignone.view.manager.ManagerView;

/**
 * Use Case: Change UI to Delete Flight View                                <br>
 * Pre-condition: Manager is logged in and clicks the 'delete flight' button. <br>
 * Post-condition: Delete flight view is displayed                            <br>
 * 1. System exits the current view                                         <br>
 * 2. System opens the delete flight view                                   <br>

 * @author group2
 */
public class UCUIDeleteFlight implements UCController {

    /**
    * use case to change UI to delete flight view
    */
    @Override
    public void run() {
        //1. System exits the current view
        ManagerView mv = ManagerView.getInstance();
        mv.dispose();
        //2. System opens the delete flight view  
        DeleteFlightView dv = new DeleteFlightView();
        dv.go();
    }
}
